<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
</head>
<body>
	<script type="tpl" id="tpl">
		<table><tr>
			<td valign="top" colspan="2">
    <input type="radio" name="1045" id="1045_1" value="1">
    <label for="1045_1">√</label>
    <br>
    <input type="radio" name="1045" id="1045_2" value="0">
    <label for="1045_2">×</label>
</td>
<td valign="top" colspan="4">
    <input type="radio" name="1046" id="1046_1" value="1">
    <label for="1046_1">√</label>
    <br>
    <input type="radio" name="1046" id="1046_2" value="0">
    <label for="1046_2">×</label>
</td>
<td valign="top" colspan="3">
    <input type="radio" name="1047" id="1047_1" value="1">
    <label for="1047_1">√</label>
    <br>
    <input type="radio" name="1047" id="1047_2" value="0">
    <label for="1047_2">×</label>
</td>
<td valign="top" colspan="3">
    <input type="radio" name="1048" id="1048_1" value="1">
    <label for="1048_1">√</label>
    <br>
    <input type="radio" name="1048" id="1048_2" value="0">
    <label for="1048_2">×</label>
</td>
<td valign="top" colspan="3">
    <input type="radio" name="1049" id="1049_1" value="1">
    <label for="1049_1">√</label>
    <br>
    <input type="radio" name="1049" id="1049_2" value="0">
    <label for="1049_2">×</label>
</td>
<td valign="top" colspan="4">
    <input type="radio" name="1050" id="1050_1" value="1">
    <label for="1050_1">√</label>
    <br>
    <input type="radio" name="1050" id="1050_2" value="0">
    <label for="1050_2">×</label>
</td>
<td valign="top" colspan="2">
    <input type="radio" name="1051" id="1051_1" value="1">
    <label for="1051_1">√</label>
    <br>
    <input type="radio" name="1051" id="1051_2" value="0">
    <label for="1051_2">×</label>
</td>
<td valign="top" colspan="2">
    <input type="radio" name="1052" id="1052_1" value="1">
    <label for="1052_1">√</label>
    <br>
    <input type="radio" name="1052" id="1052_2" value="0">
    <label for="1052_2">×</label>
</td>
<td valign="top" colspan="3">
    <input type="radio" name="1053" id="1053_1" value="1">
    <label for="1053_1">√</label>
    <br>
    <input type="radio" name="1053" id="1053_2" value="0">
    <label for="1053_2">×</label>
</td>
<td valign="top" colspan="3">
    <input type="radio" name="1054" id="1054_1" value="1">
    <label for="1054_1">√</label>
    <br>
    <input type="radio" name="1054" id="1054_2" value="0">
    <label for="1054_2">×</label>
</td>
<td valign="top" colspan="3">
    <input type="radio" name="1055" id="1055_1" value="1">
    <label for="1055_1">√</label>
    <br>
    <input type="radio" name="1055" id="1055_2" value="0">
    <label for="1055_2">×</label>
</td>
<td valign="top" colspan="2">
    <input type="radio" name="1056" id="1056_1" value="1">
    <label for="1056_1">√</label>
    <br>
    <input type="radio" name="1056" id="1056_2" value="0">
    <label for="1056_2">×</label>
</td>
<td valign="top" colspan="7">
    <input type="radio" name="1057" id="1057_1" value="1">
    <label for="1057_1">√</label>
    <br>
    <input type="radio" name="1057" id="1057_2" value="0">
    <label for="1057_2">×</label>
</td>
<td valign="top" colspan="2">
    <input type="radio" name="1058" id="1058_1" value="1">
    <label for="1058_1">√</label>
    <br>
    <input type="radio" name="1058" id="1058_2" value="0">
    <label for="1058_2">×</label>
</td>
<td valign="top" colspan="3">
    <input type="radio" name="1059" id="1059_1" value="1">
    <label for="1059_1">√</label>
    <br>
    <input type="radio" name="1059" id="1059_2" value="0">
    <label for="1059_2">×</label>
</td>
<td valign="top" colspan="2">
    <input type="radio" name="1060" id="1060_1" value="1">
    <label for="1060_1">√</label>
    <br>
    <input type="radio" name="1060" id="1060_2" value="0">
    <label for="1060_2">×</label>
</td>
<td valign="top" colspan="4">
    <input type="radio" name="1061" id="1061_1" value="1">
    <label for="1061_1">√</label>
    <br>
    <input type="radio" name="1061" id="1061_2" value="0">
    <label for="1061_2">×</label>
</td>
<td valign="top" colspan="2">
    <input type="radio" name="1062" id="1062_1" value="1">
    <label for="1062_1">√</label>
    <br>
    <input type="radio" name="1062" id="1062_2" value="0">
    <label for="1062_2">×</label>
</td>
<td valign="top" colspan="3">
    <input type="radio" name="1063" id="1063_1" value="1">
    <label for="1063_1">√</label>
    <br>
    <input type="radio" name="1063" id="1063_2" value="0">
    <label for="1063_2">×</label>
</td>
<td valign="top" colspan="2">
    <input type="radio" name="1064" id="1064_1" value="1">
    <label for="1064_1">√</label>
    <br>
    <input type="radio" name="1064" id="1064_2" value="0">
    <label for="1064_2">×</label>
</td>
    </tr></table>	
	</script>
	<div id="ret"></div>
	<script src="lib/jquery.js"></script>
	<script>
	var i = 1045 ,ret = '';
		$($("#tpl").html()).find("td").each(function(){
			//$("#ret").append($(this).html($(this).html().replace(/\$/g,i++)));
           $("#ret").append( $(this).attr("pid",$(this).find("input").first().attr("name")));
		});
		$("#ret").text($("#ret").html());
	</script>
</body>
</html>